<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<title>牛皮-layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">

<!-- 引入通用的js, css等 -->
<jsp:include page="${request.contextPath}/static/include.jsp" flush="true" />
<!-- 引入tds表单样式 -->
<link rel="stylesheet"	href="${request.contextPath}/static/css/wpsForm.css" />

</head>
<body class="childrenBody">
	<form class="layui-form linksAdd" action="">
		<table border="1" class="tds-table">
			<tbody>
				<tr>
					<td class="item w15">
						<div class="item-txt">所在部门</div>
					</td>
					<td class="item-con w35">
						<div class="layui-input-inline layui-col-xs9 w100 gray">
							（默认当前账号所在部门）</div>
					</td>
					<td class="item w15">
						<div class="item-txt">姓名</div>
					</td>
					<td class="item-con w35">
						<div class="layui-input-inline layui-col-xs9 w100 gray">
							（默认账号对应姓名）</div>
					</td>
				</tr>

				<tr>
					<td class="item w15">
						<div class="item-txt">请假类型</div>
					</td>
					<td class="item-con w35">
						<div class="layui-input-inline layui-col-xs9 w100">
							<select name="interest" lay-filter="aihao">
								<option value=""></option>
								<option value="0">年休假</option>
								<option value="1">探亲假（未婚探父母）</option>
								<option value="2">探亲假（已婚探父母）</option>
								<option value="3">探亲假（探配偶）</option>
								<option value="4">婚假</option>
								<option value="5">事假</option>
								<option value="6">病假</option>
								<option value="7">丧假</option>
								<option value="8">产假</option>
								<option value="9">陪产假</option>
								<option value="10">哺乳假</option>
								<option value="11">计生假</option>
								<option value="12">值班补休假</option>
							</select>
						</div>
					</td>
					<td class="item w15">
						<div class="item-txt">请假时间</div>
					</td>
					<td class="item-con w35">
						<div class="layui-input-inline layui-col-xs9 w100">
							<input type="text" class="layui-input" id="test16"
								placeholder="开始 到 结束" readonly="readonly">
						</div>
					</td>
				</tr>

				<tr>
					<td class="item w15">
						<div class="item-txt">申请内容</div>
					</td>
					<td class="item-con w35" colspan="3">
						<div class="layui-input-inline layui-col-xs9 w100">
							<textarea name="remarks" placeholder="请输入申请内容"
								lay-verify='maxLength' length="200" style="height:250px;"
								class="layui-textarea"></textarea>
						</div>
					</td>
				</tr>

				<tr>
					<td class="item w15">
						<div class="item-txt">相关附件</div>
					</td>
					<td class="item-con w35" colspan="3">
						<div class="layui-input-inline layui-col-xs9 w100">
							<button type="button" class="layui-btn" id="test3">
								<i class="layui-icon"></i>上传文件
							</button>
							<div>（1）看病证明文件1.jpg</div>
							<div>（2）看病证明文件2.jpg</div>
						</div>
					</td>
				</tr>
				
				<tr>
					<td class="item w15">
						<div class="item-txt">审批记录</div>
					</td>
					<td class="item-con w35" colspan="3">
						<div class="layui-input-inline layui-col-xs9 w100">
							<div><span>【1】</span> 2019-1-24 22:16:07 组长 审批通过</div>
							<div><span>【2】</span> 2019-1-24 22:16:18 部门领导 审批通过</div>
							<div><span>【3】</span>  2019-1-24 22:16:32 分管领导 审批 通过</div>
						</div>
					</td>
				</tr>
				
				<tr>
					<td class="item w15">
						<div class="item-txt">审批结果</div>
					</td>
					<td class="item-con w35" colspan="3">
						<div class="layui-input-inline layui-col-xs9 w100">
							<input type="radio" name="result" value="1" title="同意" checked>
						    <input type="radio" name="result" value="2" title="不同意">
						</div>
					</td>
				</tr>
				
				<tr>
					<td class="item w15">
						<div class="item-txt">审批意见</div>
					</td>
					<td class="item-con w35" colspan="3">
						<div class="layui-input-inline layui-col-xs9 w100">
							<textarea name="remarks" placeholder="请输入审批意见"
								lay-verify='maxLength' length="200" style="height:100px;"
								class="layui-textarea"></textarea>
						</div>
					</td>
				</tr>


			</tbody>
		</table>
	</form>
</body>


<script type="text/javascript">
	//全局定义一次, 加载formSelects(formSelects是layui第三方组件，https://fly.layui.com/extend/formSelects/)
	layui.config({
		base : __ctxPath + '/libs/layuiExt/js/' //此处路径请自行处理, 可以使用绝对路径
	}).extend({
		formSelects : 'formSelects-v4.min'
	});
	//一般直接写在一个js文件中
	layui.use([ 'form', 'layer', 'laydate', 'formSelects' ], function() {
		var form = layui.form,
			formSelects = layui.formSelects,
			laydate = layui.laydate,
			layer = layui.layer,
			$ = layui.jquery;

		laydate.render({
			elem : '#test16',
			type : 'datetime',
			range : '到',
			format : 'yyyy-MM-dd HH:mm:ss'
		});


		form.on('submit(*)', function(data) { //form校验成功才会执行下面的代码
			//防止重复提交
			parent.stopCommitRepeat();

			$.post(__ctxPath + "/assit/caseInfo.do?method=add", $("form").serialize(), function(response) {
				if (response.code == 200) {
					//关闭当前弹出层
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);

					//触发父页面的操作成功
					$(parent.document).find(".search_btn").click();
					parent.layer.msg(response.msg);
				}
				layer.msg(response.msg);
			}, "json");

			return false; //禁用form表单自带的提交
		});


	});
</script>














</html>







